import axios from '@/utils/request'

// 新增广告
export function addAdvert(data) {
  return axios({
    url: '/wifi_admin/advert/add',
    method: 'post',
    data
  })
}

// 广告查询
export function advertList(data) {
  return axios({
    url: `/wifi_admin/advert/list`,
    method: 'post',
    params: { page: data.page, pageSize: data.pageSize },
    data
  })
}

export function delAdvert(data) {
  return axios({
    url: '/wifi_admin/advert/delete',
    method: 'post',
    params: data
  })
}

export function getWiFiDetail(params) {
  return axios({
    url: '/wifi_admin/advert/getDetail',
    method: 'get',
    params
  })
}

export function updateAdvert(data) {
  return axios({
    url: `/wifi_admin/advert/update`,
    method: 'post',
    data
  })
}
